package thinkinjava4.ch20_annotations;

import thinkinjava4.atunit.Test;
import thinkinjava4.util.OSExecute;

import java.util.HashSet;

public class HashSetTest {
    HashSet<String> testObject = new HashSet<>();

    @Test
    void initialization() {
        assert testObject.isEmpty();
    }

    @Test
    void _contains() {
        testObject.add("one");
        assert testObject.contains("one");
    }

    @Test
    void _remove() {
        testObject.add("one");
        testObject.remove("one");
        assert testObject.isEmpty();
    }

    public static void main(String[] args) throws Exception {
        OSExecute.command(OSExecute.DEFAULT_DIR, OSExecute.ATUNIT_ANN + "HashSetTest");
    }
}
